<?php 
$this->headLink()->prependStylesheet(_STATIC_HTTP . '/www/css/photo.css');
$this->headScript()->appendFile(_STATIC_HTTP . '/jquery/rotate.js');
$this->headScript()->appendFile(_STATIC_HTTP . '/www/js/photo.js');
$photos = (array) $this->special['_photos'];
$index = 1;
$total = count($photos);
foreach($photos AS $key => $photo) {
	if($this->photo['id'] == $photo['id']) {
		$index = $key + 1;
		break;
	}
}
$title = $this->escape($this->special['title']) ;
?>
<h1><a href="<?php echo $this->special['_url'];?>" class="yellow"><?php echo $title . '<em>(' . $index . '/' . $total . ')</em>';?></a></h1>
<div class="logo"><a href="http://www.<?php echo system_setting_language::getCurrentHost();?>/" title="<?php echo $this->setting('title');?>"><?php echo $this->setting('title');?></a></div>
<div class="image">
	<div class="imgBox">
		<a class="display" href="<?php echo $this->special['_url'];?>">
		<img alt="<?php echo $title;?>" src="<?php echo $this->photo['_image']['thumb'];?>" class="o9" />
		</a>
		<span class="previous" title="<?php echo $this->language('上一张');?>"><?php echo $this->language('上一张');?></span>
		<span class="next" title="<?php echo $this->language('下一张');?>"><?php echo $this->language('下一张');?></span>
		<div class="toolbox">
			<div class="icon">
				<ul class="o6">
					<li><a class="player play" href="#play" title="<?php echo $this->language('自动播放');?>">Play</a></li>
					<li><a class="revolve-l" href="#revolve" title="<?php echo $this->language('左旋转');?>">Left</a></li>
					<li><a class="revolve-r" href="#revolve" title="<?php echo $this->language('右旋转');?>">Right</a></li>
					<li><a class="zoom" href="#zoom" title="<?php echo $this->language('放大');?>">Zoom</a></li>
				</ul>
			</div>
		</div>
		<div class="myplayer o6"><a href="#stop" title="<?php echo $this->language('按ESC键停止自动播放');?>">Stop</a></div>
	</div>
</div>
<div class="h1mask o4"></div>
<ul class="np o7">
	<?php 
	$previous = $this->special['_previous'];
	if(!empty($previous)) {
		echo '<li class="prev">';
		echo '<a href="' . $previous['_gurl'] . '" title="' . $this->escape($previous['title']) . '[' . $previous['ptotal'] . ' photos]">';
		echo '<strong>' . $this->language('上一组好图') . '</strong>';
		echo '<span><img src="' . $previous['_cover']['small'] . '" /></span>';
		echo '</a>';
		echo '</li>';
	}
	$next = $this->special['_next'];
	if(!empty($next)) {
		echo '<li class="next">';
		echo '<a href="' . $next['_gurl'] . '" title="' . $this->escape($next['title']) . '[' . $next['ptotal'] . ' photos]">';
		echo '<strong>' . $this->language('下一组好图') . '</strong>';
		echo '<span><img src="' . $next['_cover']['small'] . '" /></span>';
		echo '</a>';
		echo '</li>';
	}
	?>
</ul>
<div class="gallery" id="gallery">
	<div class="container">
		<ul>
			<?php foreach($photos AS $photo) {?>
			<li class="<?php echo ($photo['id'] != $this->photo['id']) ? 'o5' : 'current';?>">
				<div class="img">
					<a href="<?php echo $photo['_url'];?>">
					<img src="<?php echo $photo['_image']['small'];?>" title="<?php echo $this->escape($photo['title']);?>" />
					</a>
				</div>
			</li>
			<?php } ?>
		</ul>
		<a href="#left" class="arrow l o8 leftButton">Left</a>
		<a href="#right" class="arrow r o8 rightButton">Right</a>
	</div>
</div>
<div class="gallery gmask o5"></div>
<div class="related o8">
	<h3><?php echo $this->language('相关推荐');?></h3>
	<div class="relatedBox">
		<ul>
			<?php foreach($this->special['_related'] AS $special) {?>
			<li>
				<a href="<?php echo $special['_gurl'];?>">
				<img src="<?php echo $special['_cover']['thumb'];?>" alt="<?php echo $this->escape($special['title']);?>" />
				<em class="o6"><strong><?php echo $special['ptotal']?></strong> photo(s)</em>
				</a>
			</li>
			<?php } ?>
		</ul>
	</div>
</div>
<?php echo $this->render('layout/_inc/upanel.phtml');?>
<div class="comment o8">
	<?php echo $this->render('include/comment.phtml');?>
</div>
<div class="zoomPanel">
	<code><a href="#close">&times;</a></code>
	<div class="zoomBox"><span><img class="zoomImg" src="#" /></span></div>
</div>
<div class="zoomMask o9"></div>
<div class="share">
	<div class="sharebuttons"><?php echo $this->advertise('share')->render($this->client);?></div>
</div>
<div class="xloading o8">Loading..</div>
<div class="processbar"></div>
<div class="br o8"><i></i><em><?php echo $this->language('建议不要使用IE浏览器浏览，抵制IE,从你我做起');?>!</em></div>
<?php $this->headStyle()->captureStart();?>
.image div.imgBox span.previous {cursor:url(<?php echo $this->baseUrl('/resource/prev.cur');?>),auto;}
.image div.imgBox span.next {cursor:url(<?php echo $this->baseUrl('/resource/next.cur');?>),auto;}
<?php $this->headStyle()->captureEnd();?>
